|
|
|
|
|
|
|
Lets now add this control to the Employee Information form (see Figure 14.3). |
|
|
|
|
|
|
|
|
Figure 14.3
The DataList control on the Employee Information form. |
|
|
|
|
|
|
|
|
Examples Filename: DataList.frm |
|
|
|
|
| Add a DataList Control 1. Increase the width of the form to put a DataList control next to all the other controls. 2. Move all the custom controls over to the far right of the screen. You can select all the controls by pressing Ctrl+A; you can then move the controls as a group using your mouse. 3. Draw a DataList control next to the controls on the left side. 4. Set the Name property to dlstEmp. 5. Set the DataSource property to datEmployees. 6. Set the DataField property to lEmp_id. 7. Set the BoundColumn property to lEmp_id. 8. Set the RowSource property to datEmployees. 9. Set the ListField property to szLast_nm. |  | You should now be able to run this form and see the first item in the list highlighted. You can also move through the records using the command buttons, and the highlight on the list box will move. |
|
|
|